import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;

import javax.swing.JPanel;


class ChargementImg extends JPanel {
	 
    private Image img;
    private int x;
    private int y;

    public ChargementImg(Image img,int x, int y) {
      this.img = img;
      this.x = x;
      this.y = y;
      Dimension size = new Dimension(img.getWidth(null), img.getHeight(null));
      setPreferredSize(size);
      setMinimumSize(size);
      setMaximumSize(size);
      setSize(size);
      setLayout(null);
    }

    public void paintComponent(Graphics g) {
      g.drawImage(img, x, y, null);
    }

  }
